package com.turing.service.impl;

import com.turing.domain.CategoryTwo;
import com.turing.mapper.CategoryTwoMapper;
import com.turing.service.ICategoryTwoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class CategoryTwoServiceImpl implements ICategoryTwoService {

    @Autowired
    private CategoryTwoMapper categoryTwoMapper;

    @Override
    public List<CategoryTwo> selectAll() {
        return categoryTwoMapper.selectList();
    }

    @Override
    public CategoryTwo selectById(Long id) {
        return categoryTwoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertOne(CategoryTwo categoryTwo) {
        return categoryTwoMapper.insertSelective(categoryTwo);
    }

    @Override
    public int updateById(CategoryTwo categoryTwo) {
        return categoryTwoMapper.updateByPrimaryKeySelective(categoryTwo);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return categoryTwoMapper.deleteByPrimaryKey(ids);
    }

    @Override
    public List<CategoryTwo> selectPage(CategoryTwo categoryTwo) {
        return categoryTwoMapper.selectPage(categoryTwo);
    }
}
